#!/Users/meihao/.virtualenvs/meiduo_mall/bin/python

import sys
sys.path.insert(0, '../../')
import os

# 以下几种方式都可以:
# sys.path.insert(0, '/Users/meihao/Desktop/meiduo_mall_pro/meiduo_mall/meiduo_mall/apps')
# sys.path.insert(0, '../apps')
# sys.path.insert(0, os.path.join(sys.path[0], 'meiduo_mall/apps'))
sys.path.insert(0, './apps')

# import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'meiduo_mall.settings.dev')

import django
django.setup()

from celery_tasks.html.tasks import generate_static_sku_detail_html
from goods.models import SKU



skus = SKU.objects.all()
for sku in skus:
    generate_static_sku_detail_html.delay(sku.id)